/*  ----------------------------------------------------------------------------
 *  Arello Mobile
 *  Fast 3d Engine
 *  ----------------------------------------------------------------------------
 * Except where otherwise noted, this work is licensed under
 * http://creativecommons.org/licenses/by/3.0
 */

#include "ForceEffect.h"
#include "Manager.h"
#include <input/hard/Hardware.h>
#include <input/hard/ForceEffect.h>

namespace liba
{
namespace input
{

ForceEffect::ForceEffect( const std::string & device_name, const filesystem::String & effect_name )
:	effect( Manager::create_force_effect( device_name, effect_name ) )
{}

ForceEffect::~ForceEffect()
{
	delete effect; effect = 0;
}

bool ForceEffect::stop()
{
	if( effect )
		return effect->stop();
	return false;
}

bool ForceEffect::play()
{
	if( effect )
		return effect->play();
	return false;
}

bool ForceEffect::is_playing()
{
	if( effect )
		return effect->is_playing();
	return false;
}


} // namespace input
} // namespace liba


